<style>
  body {
    background-color: #ffffff;
  }

  .layui-iconpicker-body.layui-iconpicker-body-page .hide {
    display: none;
  }
</style>

<div class="layui-form layuimini-form">

  <input type="hidden" value="{$model->id}" name="id">

  <div class="layui-form-item">
    <label class="layui-form-label required">角色名称</label>
    <div class="layui-input-block">
      <input type="text" name="title" autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="请输入角色名称"
             placeholder="请输入角色名称" value="{$model->title}">
      <tip>填写角色名称</tip>
    </div>
  </div>


  <div class="layui-form-item">
    <label class="layui-form-label">备注信息</label>
    <div class="layui-input-block">
      <textarea name="remark" class="layui-textarea" placeholder="请输入备注信息">{$model->remark}</textarea>
    </div>
  </div>


  <div class="layui-form-item">
    <label class="layui-form-label">状态</label>
    <div class="layui-input-block">
      <select name="status" lay-filter="status">
        <option value="0" {if $model->status==0} selected="" {/if}>无效</option>
        <option value="1" {if $model->status==1} selected="" {/if}>有效</option>
      </select>
    </div>
  </div>


  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
    </div>
  </div>
</div>
<script>
  layui.use(['form'], function () {
    var form = layui.form,
            layer = layui.layer,
            $ = layui.$;
    form.on('submit(saveBtn)', function (data) {
      var post_data = data.field;
      postData("{:url('role/edit')}", post_data, '修改成功');
      return false;
    });
  });
</script>